import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from "./views/Login";
import Home from "@/views/Home";
import Refresh from "@/views/Refresh";
import Questionnaire from "@/views/Questionnaire";
import Question from "@/views/Question";
import Answer from "@/views/Answer";

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        component: Home
    },
    {
        path: "/login",
        component: Login
    },
    {
        path: "/questionnaire",
        component: Questionnaire
    },
    {
        path: "/questionnaire/:questionnaireId",
        name: "Question",
        component: Question
    },
    {
        path: "/questionnaire/:questionnaireId/:questionId",
        name: "Answer",
        component: Answer
    },
    {
        path: "/refresh",
        component: Refresh
    }
]

const router = new VueRouter({
    routes,
    // mode: 'history'   //去除#号
})

export default router
